#ifndef TFUNITTEST_H
#define TFUNITTEST_H

#include <BDVector.h>
#include <BDThread.h>

class TFTest;
class TFEventListener;
class TFTestAbstractFactory;

class TFUnitTest : public BDThread
{
public:
	TFUnitTest();
	virtual ~TFUnitTest();

	void AddTest(TFTest* pTest);

	void AddEventListener(TFEventListener* listener);

	static TFUnitTest* GetInstance();

	static void Destroy();

	void RegisterTest(TFTestAbstractFactory* factory);

	void StartAllTests();

	TFTest* CurrentTest();

	void* Run(void* data);

	void SkipCurrentTest();

	void RemoveEventListener(TFEventListener* listener);

	TFTest* GetTest(int index);

	int TestCount();

private:

	static TFUnitTest* m_pInstance;

	BDVector<TFTest*> m_vecTest;

	TFTest* m_pCurrentTest;
};

#endif
